3.3.22 \(\int \frac {\sqrt {a+a \cos (e+f x)}}{\sqrt {\cos (e+f x)}} \, dx\) [222]

Optimal. Leaf size=37 \[ \frac {2 \sqrt {a} \text {ArcSin}\left (\frac {\sqrt {a} \sin (e+f x)}{\sqrt {a+a \cos (e+f x)}}\right )}{f} \]

[Out]

2*arcsin(sin(f*x+e)*a^(1/2)/(a+a*cos(f*x+e))^(1/2))*a^(1/2)/f

________________________________________________________________________________________

Rubi [A]
time = 0.05, antiderivative size = 37, normalized size of antiderivative = 1.00, number of steps used = 2, number of rules used = 2, integrand size = 25, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.080, Rules used = {2853, 222} \begin {gather*} \frac {2 \sqrt {a} \text {ArcSin}\left (\frac {\sqrt {a} \sin (e+f x)}{\sqrt {a \cos (e+f x)+a}}\right )}{f} \end {gather*}

Antiderivative was successfully verified.

[In]

Int[Sqrt[a + a*Cos[e + f*x]]/Sqrt[Cos[e + f*x]],x]

[Out]

(2*Sqrt[a]*ArcSin[(Sqrt[a]*Sin[e + f*x])/Sqrt[a + a*Cos[e + f*x]]])/f

Rule 222

Int[1/Sqrt[(a_) + (b_.)*(x_)^2], x_Symbol] :> Simp[ArcSin[Rt[-b, 2]*(x/Sqrt[a])]/Rt[-b, 2], x] /; FreeQ[{a, b}
, x] && GtQ[a, 0] && NegQ[b]

Rule 2853

Int[Sqrt[(a_) + (b_.)*sin[(e_.) + (f_.)*(x_)]]/Sqrt[(d_.)*sin[(e_.) + (f_.)*(x_)]], x_Symbol] :> Dist[-2/f, Su
bst[Int[1/Sqrt[1 - x^2/a], x], x, b*(Cos[e + f*x]/Sqrt[a + b*Sin[e + f*x]])], x] /; FreeQ[{a, b, d, e, f}, x]
&& EqQ[a^2 - b^2, 0] && EqQ[d, a/b]

Rubi steps

\begin {align*} \int \frac {\sqrt {a+a \cos (e+f x)}}{\sqrt {\cos (e+f x)}} \, dx &=-\frac {2 \text {Subst}\left (\int \frac {1}{\sqrt {1-\frac {x^2}{a}}} \, dx,x,-\frac {a \sin (e+f x)}{\sqrt {a+a \cos (e+f x)}}\right )}{f}\\ &=\frac {2 \sqrt {a} \sin ^{-1}\left (\frac {\sqrt {a} \sin (e+f x)}{\sqrt {a+a \cos (e+f x)}}\right )}{f}\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]
time = 0.07, size = 50, normalized size = 1.35 \begin {gather*} \frac {\sqrt {2} \text {ArcSin}\left (\sqrt {2} \sin \left (\frac {1}{2} (e+f x)\right )\right ) \sqrt {a (1+\cos (e+f x))} \sec \left (\frac {1}{2} (e+f x)\right )}{f} \end {gather*}

Antiderivative was successfully verified.

[In]

Integrate[Sqrt[a + a*Cos[e + f*x]]/Sqrt[Cos[e + f*x]],x]

[Out]

(Sqrt[2]*ArcSin[Sqrt[2]*Sin[(e + f*x)/2]]*Sqrt[a*(1 + Cos[e + f*x])]*Sec[(e + f*x)/2])/f

________________________________________________________________________________________

Maple [B] Leaf count of result is larger than twice the leaf count of optimal. \(79\) vs. \(2(31)=62\).
time = 1.12, size = 80, normalized size = 2.16

method result size
default \(\frac {2 \sqrt {\frac {\cos \left (f x +e \right )}{\cos \left (f x +e \right )+1}}\, \sqrt {a \left (\cos \left (f x +e \right )+1\right )}\, \arctan \left (\frac {\sin \left (f x +e \right ) \sqrt {\frac {\cos \left (f x +e \right )}{\cos \left (f x +e \right )+1}}}{\cos \left (f x +e \right )}\right )}{f \sqrt {\cos \left (f x +e \right )}}\) \(80\)

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((a+a*cos(f*x+e))^(1/2)/cos(f*x+e)^(1/2),x,method=_RETURNVERBOSE)

[Out]

2/f/cos(f*x+e)^(1/2)*(cos(f*x+e)/(cos(f*x+e)+1))^(1/2)*(a*(cos(f*x+e)+1))^(1/2)*arctan(sin(f*x+e)*(cos(f*x+e)/
(cos(f*x+e)+1))^(1/2)/cos(f*x+e))

________________________________________________________________________________________

Maxima [B] Leaf count of result is larger than twice the leaf count of optimal. 158 vs. \(2 (33) = 66\).
time = 0.56, size = 158, normalized size = 4.27 \begin {gather*} \frac {\sqrt {a} \arctan \left ({\left (\cos \left (2 \, f x + 2 \, e\right )^{2} + \sin \left (2 \, f x + 2 \, e\right )^{2} + 2 \, \cos \left (2 \, f x + 2 \, e\right ) + 1\right )}^{\frac {1}{4}} \sin \left (\frac {1}{2} \, \arctan \left (\sin \left (2 \, f x + 2 \, e\right ), \cos \left (2 \, f x + 2 \, e\right ) + 1\right )\right ) + \sin \left (f x + e\right ), {\left (\cos \left (2 \, f x + 2 \, e\right )^{2} + \sin \left (2 \, f x + 2 \, e\right )^{2} + 2 \, \cos \left (2 \, f x + 2 \, e\right ) + 1\right )}^{\frac {1}{4}} \cos \left (\frac {1}{2} \, \arctan \left (\sin \left (2 \, f x + 2 \, e\right ), \cos \left (2 \, f x + 2 \, e\right ) + 1\right )\right ) + \cos \left (f x + e\right )\right )}{f} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+a*cos(f*x+e))^(1/2)/cos(f*x+e)^(1/2),x, algorithm="maxima")

[Out]

sqrt(a)*arctan2((cos(2*f*x + 2*e)^2 + sin(2*f*x + 2*e)^2 + 2*cos(2*f*x + 2*e) + 1)^(1/4)*sin(1/2*arctan2(sin(2
*f*x + 2*e), cos(2*f*x + 2*e) + 1)) + sin(f*x + e), (cos(2*f*x + 2*e)^2 + sin(2*f*x + 2*e)^2 + 2*cos(2*f*x + 2
*e) + 1)^(1/4)*cos(1/2*arctan2(sin(2*f*x + 2*e), cos(2*f*x + 2*e) + 1)) + cos(f*x + e))/f

________________________________________________________________________________________

Fricas [A]
time = 0.44, size = 128, normalized size = 3.46 \begin {gather*} \left [\frac {\sqrt {-a} \log \left (\frac {2 \, a \cos \left (f x + e\right )^{2} - 2 \, \sqrt {a \cos \left (f x + e\right ) + a} \sqrt {-a} \sqrt {\cos \left (f x + e\right )} \sin \left (f x + e\right ) + a \cos \left (f x + e\right ) - a}{\cos \left (f x + e\right ) + 1}\right )}{f}, -\frac {2 \, \sqrt {a} \arctan \left (\frac {\sqrt {a \cos \left (f x + e\right ) + a} \sqrt {\cos \left (f x + e\right )}}{\sqrt {a} \sin \left (f x + e\right )}\right )}{f}\right ] \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+a*cos(f*x+e))^(1/2)/cos(f*x+e)^(1/2),x, algorithm="fricas")

[Out]

[sqrt(-a)*log((2*a*cos(f*x + e)^2 - 2*sqrt(a*cos(f*x + e) + a)*sqrt(-a)*sqrt(cos(f*x + e))*sin(f*x + e) + a*co
s(f*x + e) - a)/(cos(f*x + e) + 1))/f, -2*sqrt(a)*arctan(sqrt(a*cos(f*x + e) + a)*sqrt(cos(f*x + e))/(sqrt(a)*
sin(f*x + e)))/f]

________________________________________________________________________________________

Sympy [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \int \frac {\sqrt {a \left (\cos {\left (e + f x \right )} + 1\right )}}{\sqrt {\cos {\left (e + f x \right )}}}\, dx \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+a*cos(f*x+e))**(1/2)/cos(f*x+e)**(1/2),x)

[Out]

Integral(sqrt(a*(cos(e + f*x) + 1))/sqrt(cos(e + f*x)), x)

________________________________________________________________________________________

Giac [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {could not integrate} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+a*cos(f*x+e))^(1/2)/cos(f*x+e)^(1/2),x, algorithm="giac")

[Out]

integrate(sqrt(a*cos(f*x + e) + a)/sqrt(cos(f*x + e)), x)

________________________________________________________________________________________

Mupad [F]
time = 0.00, size = -1, normalized size = -0.03 \begin {gather*} \int \frac {\sqrt {a+a\,\cos \left (e+f\,x\right )}}{\sqrt {\cos \left (e+f\,x\right )}} \,d x \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((a + a*cos(e + f*x))^(1/2)/cos(e + f*x)^(1/2),x)

[Out]

int((a + a*cos(e + f*x))^(1/2)/cos(e + f*x)^(1/2), x)

________________________________________________________________________________________